﻿Public Class Assignment
    Public studentlist As New List(Of Student)
    Dim assignmentname As String
    Dim assignmentid As String
    Dim grade As Int32
    Dim timedue As Int32
    Dim timeavailable As Int32

    Public Sub New(ByVal assignmentname As String, ByVal assignmentid As String, ByVal grade As Int32)
        Me.assignmentname = assignmentname
        Me.assignmentid = assignmentid
        Me.grade = grade
    End Sub

    Public Function getassignmentname() As String
        Return assignmentname
    End Function

    Public Function getassignmentid() As String
        Return assignmentid
    End Function

    Public Sub setstudentlist(ByVal studentlist As List(Of Student))
        Me.studentlist = studentlist
    End Sub

    Public Function getstudentlist() As List(Of Student)
        Return studentlist
    End Function

    Public Sub settimedue(ByVal timedue As Integer)
        Me.timedue = timedue
    End Sub

    Public Function gettimedue() As String
        Dim datevar As New DateTime
        Dim origin As New DateTime(1970, 1, 1, 0, 0, 0)
        datevar = origin.AddSeconds(Me.timedue)
        Return datevar.ToLongTimeString
    End Function

    Public Function getDateDue() As String
        Dim datevar As New DateTime
        Dim origin As New DateTime(1970, 1, 1, 0, 0, 0)
        datevar = origin.AddSeconds(Me.timedue)
        Return datevar.ToLongDateString
    End Function

    Public Sub settimeavailable(ByVal timeavailable As Int32)
        Me.timeavailable = timeavailable
    End Sub

    Public Function getTimeAvailable() As String
        Dim datevar As New DateTime
        Dim origin As New DateTime(1970, 1, 1, 0, 0, 0)
        datevar = origin.AddSeconds(Me.timeavailable)
        Return datevar.ToLongTimeString
    End Function

    Public Function getDateAvailable() As String
        Dim datevar As New DateTime
        Dim origin As New DateTime(1970, 1, 1, 0, 0, 0)
        datevar = origin.AddSeconds(Me.timeavailable)
        Return datevar.ToLongDateString
    End Function

    Public Sub setgrade(ByVal grade As Int32)
        Me.grade = grade
    End Sub

    Public Function getgrade() As Int32
        Return grade
    End Function

End Class
